package cool.taomu.toolkit.micrometer

import com.google.auto.service.AutoService
import com.google.inject.AbstractModule
import cool.taomu.toolkit.TaomuConfigure
import cool.taomu.toolkit.micrometer.provider.MicrometerProvider
import cool.taomu.toolkit.platform.inter.IPlatform
import io.micrometer.core.instrument.MeterRegistry

@AutoService(IPlatform)
class MicrometerPlugin implements IPlatform {

	override note() {
		"JVM监控"
	}

	override packages() {
		"cool.taomu.toolkit.micrometer.controller"
	}

	override module(TaomuConfigure configure) {
		return new AbstractModule() {
			override configure() {
				bind(MeterRegistry).toProvider(MicrometerProvider)
			}
		}
	}

	override start() {
	}

	override init() {
	}

}
